using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using TiaoTaoHelper.Wtm.Models;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.SupplyChain.Warehouse;

/// <summary>
/// 仓库实体类
/// 用于管理和维护系统中的仓库信息
/// 可以设定库管理员、仓库位置、容量等属性
/// </summary>
[Display(Name = "仓库", Description = "仓库管理", GroupName = "供应链")]
public class SysWarehouse : BasePoco
{
    /// <summary>
    /// 仓库名称
    /// </summary>
    [Display(Name = "仓库名称", Description = "仓库名称", GroupName = "基本信息")]
    [StringLength(128)]
    public string Name { get; set; }

    /// <summary>
    /// 仓库编码
    /// </summary>
    [Display(Name = "仓库编码", Description = "仓库编码", GroupName = "基本信息")]
    [StringLength(128)]
    public string Code { get; set; }

    /// <summary>
    /// ERP系统中的编号
    /// </summary>
    [Display(Name = "ERP编号", Description = "ERP系统中的编号", GroupName = "基本信息")]
    [StringLength(128)]
    public string ErpId { get; set; }

    /// <summary>
    /// 仓库描述信息
    /// </summary>
    [Display(Name = "描述", Description = "仓库描述信息", GroupName = "基本信息")]
    [StringLength(512)]
    public string Description { get; set; }

    /// <summary>
    /// 仓库物理位置
    /// </summary>
    [Display(Name = "位置", Description = "仓库物理位置", GroupName = "基本信息")]
    [StringLength(256)]
    public string Location { get; set; }

    /// <summary>
    /// 是否为虚拟仓库
    /// </summary>
    [Display(Name = "是否虚拟仓库", Description = "是否为虚拟仓库", GroupName = "基本信息")]
    public bool IsVirtual { get; set; }

    /// <summary>
    /// 仓库状态
    /// </summary>
    [Display(Name = "状态", Description = "仓库状态", GroupName = "基本信息")]
    public CommonState CommonState { get; set; }

    /// <summary>
    /// 仓库管理员列表
    /// </summary>
    [Display(Name = "库管理员", Description = "仓库管理员列表", GroupName = "管理信息")]
    public List<SysWarehouseStocker> Stockers { get; set; }
    
    /// <summary>
    /// 仓库所属组织
    /// </summary>
    [Display(Name = "所属组织", Description = "仓库所属组织列表", GroupName = "管理信息")]
    public SysOrg Org { get; set; }
    
    /// <summary>
    /// 仓库所属组织
    /// </summary>
    [Display(Name = "所属组织", Description = "仓库所属组织列表", GroupName = "管理信息")]
    public Guid? OrgId { get; set; }
}